<div id="header">
	<div id="lang">
	{l s='Idioma'}:
        {foreach from=$languages key=code item=name}
          {if $first_lang eq "1"} | {/if}
          <a{if $code eq $smarty.const.LANG} class="active"{/if} href="{$smarty.const.LANG_URL}lang={$code}">{$name}</a>
          {assign var="first_lang" value="1"}
        {/foreach}
	<!-- <a href="{$smarty.const.LANG_URL}lang=es">Castellano</a> |
	<a href="{$smarty.const.LANG_URL}lang=ro">Romana</a> -->
	</div>
	<div id="logo">
		<h1><a href="{$smarty.const.BASE_URL}">Crazy Poems</a></h1>
		<h2>{l s='Poesía loca, entra y coloca!'}</h2>
	</div>
	<div id="header_right">
		{if $session_username eq ""}
		<form action="{$smarty.const.BASE_URL}login.php" method="post">
		<p>
		<input name="form_sent" type="hidden" value="yes" />
		{l s='Usuario'}: <input type="text" name="username" class="header" />
		{l s='Contraseña'}: <input type="password" name="password"  class="header" /> 
		<input type="submit" value="{l s='Entrar'}" />
		</p>
		<p>{l s='No tienes cuenta?'} <a href="{$smarty.const.BASE_URL}new-member.php">{l s='Regístrate'}</a>! | <a href="{$smarty.const.BASE_URL}contact.php">{l s='Contacto'}</a></p>
		</form>
		{else}
		<p>{l s='Hola'} <strong>{$session_fullname}</strong>, {if $session_admin == 1}<a href="{$smarty.const.BASE_URL}admin.php">Admin</a> | {/if}<a href="{$smarty.const.BASE_URL}logout.php">{l s='Salir'}</a> | <a href="{$smarty.const.BASE_URL}contact.php">{l s='Contacto'}</a></p>
		{/if}
	</div>
	<div class="clearer"></div>
	<div id="menu_container">
		<div id="menu">
			<ul>
				<li><a href="{$smarty.const.BASE_URL}index.php">{l s='Inicio'}</a></li>
				<li><a href="{$smarty.const.BASE_URL}poems.php">{l s='Poesías'}</a></li>
				<li><a href="{$smarty.const.BASE_URL}new-poem.php">{l s='Agrega una poesía'}</a></li>
				<li><a href="{$smarty.const.BASE_URL}members.php">{l s='Miembros'}</a></li>
				<li><a href="{if $session_username eq ""}{$smarty.const.BASE_URL}login.php?next={$smarty.const.BASE_URL}member.php{else}{$smarty.const.BASE_URL}member.php?name={$session_username}{/if}">{l s='Mi Cuenta'}</a></li>
			</ul>
			<div id="search">
				 
				<form action="{$smarty.const.BASE_URL}poems.php" method="get">
				<input type="text" name="search" class="header" /> 
				<input type="submit" value="{l s='Buscar'}" />
				</form>
				
			<!--	
			<form action="http://www.google.ro/cse" id="cse-search-box">
				<div>
					<input type="hidden" name="cx" value="partner-pub-0720686592505364:gi2dwz-qxar" />
					<input type="hidden" name="ie" value="UTF-8" />
					<input type="text" name="q" size="20" />
					<input type="submit" name="sa" value="Caut&#x0103;" />
				</div>
			</form>
			<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=ro"></script>
			-->
			</div>
			<div class="clearer"></div>
		</div>
	</div>
	<div class="clearer"></div>
</div>
